package astra.client.pages.employee;

import astra.client.Astra;
import astra.client.models.Employee;
import astra.client.services.AstraService;
import astra.client.services.AstraServiceAsync;
import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.*;

/**
 * @author Kotelnikov Dmitry <a href="mailto:dimonnot@mail.ru"/>
 */
public class EmployeePopup extends DialogBox{
    interface EmployeePopupUiBinder extends UiBinder<HTMLPanel, EmployeePopup> {
    }

    private static EmployeePopupUiBinder ourUiBinder = GWT.create(EmployeePopupUiBinder.class);

    private Astra astra;
    private AstraServiceAsync service;
    @UiField
    SimplePanel message;
    @UiField
    TextBox login;
    @UiField
    TextBox name;
    @UiField
    TextBox password;
    @UiField
    TextBox address;
    @UiField
    TextBox phone;
    @UiField
    TextBox groupId;
    @UiField
    Button storeClient;
    @UiField
    Button closeButton;

    private Employee employee;

    public EmployeePopup(Astra astra, AstraServiceAsync service) {
        this.astra = astra;
        this.service = service;

        HTMLPanel rootElement = ourUiBinder.createAndBindUi(this);

        setWidth("550px");
        setWidget(rootElement);
        setModal(true);
        setGlassEnabled(true);
        setAutoHideEnabled(true);
    }

    public void edit(Employee employee) {

    }
}